
// Conexao ( @ Analog in )
// 0 - Vin
// 1 - GND
// 2 - 3.3V
// 3 - Zin
// 4 - Yin
// 5 - Xin
// Obs.: GS1 e GS2 nao conectados deixam a sensibilidade de 800mV/g (1.5g)

int VCCpin = 14;              // analog input pin 0
int GNDpin = 15;             // analog input pin 1
int Xpin = 5;                   // x-axis of the accelerometer
int Ypin = 4;                   // y-axis
int Zpin = 3;                   // z-axis (only on 3-axis models)

void setup()
{
  Serial.begin(9600);

  // Provide ground and power by using the analog inputs as normal
  // digital pins.  This makes it possible to directly connect the
  // breakout board to the Arduino.  If you use the normal 5V and
  // GND pins on the Arduino, you can remove these lines.
  pinMode(GNDpin, OUTPUT);
  pinMode(VCCpin, OUTPUT);
  digitalWrite(GNDpin, LOW); 
  digitalWrite(VCCpin, HIGH);
}

void loop()
{
  Serial.print("X: ");
  Serial.print(analogRead(Xpin));
  Serial.print(" Y: ");
  Serial.print(analogRead(Ypin));
  Serial.print(" Z: ");
  Serial.println(analogRead(Zpin));
  delay(100);
}

